package com.wufei.tastefor.adapter;

import android.content.Context;
import android.net.Uri;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.view.View;

import com.facebook.drawee.view.SimpleDraweeView;
import com.wufei.tastefor.R;
import com.wufei.tastefor.bean.HotMenu;

import java.util.List;


/**
 * Created by wbcomputer on 2015/11/10.
 */
public class HotMenuAdapter extends FragmentPagerAdapter {

    private List<Fragment> fragments;

    public HotMenuAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public int getCount() {
        return fragments == null ? 0 : fragments.size();
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return super.isViewFromObject(view, object);
    }
}
